#include<iostream>
#include<string>
using namespace std;

int main()
{
    string s;
    cin >> s;
    double ret = 1;
    int count = 0;
    for (int i = 0; i < s.size(); i++)
    {
        if (s[i] == '-') ret *= 1.5;
        if (s[i] == '2') count ++;
    }
    if ((s[s.size() - 1] - '0') % 2 == 0) ret *= 2;
    double f = ((double)count /( s[0] == '-' ? (s.size() - 1) : s.size()));
    // cout << f << endl;
    ret *= f;
    printf("%.2lf", ret * 100);
    cout << "%" << endl;
    return 0;
}